package com.zodiac.app.szse.e.e0201.e020101;

import org.apache.commons.lang3.EnumUtils;

import java.util.Objects;

public enum E020101Board {
    ALL("上市公司列表", "tab1"),
    ZHU("主板", "tab2"),
    ZHONG("中小企业板", "tab3"),
    CHUANG("创业板", "tab4");
    private String description;
    private String value;

    E020101Board(String description, String value) {
        this.description = description;
        this.value = value;
    }

    public String getDescription() {
        return description;
    }

    public String getValue() {
        return value;
    }

    public static E020101Board of(String value) {
        return EnumUtils.getEnumList(E020101Board.class).stream().filter(item -> Objects.equals(item.getValue(), value)).findFirst().orElse(null);
    }
}
